#include "musicinfo.h"
#include <QDebug>

MusicInfo::MusicInfo(int iIndex, int iMusicID, QString sMusicName, QString sSingerName, QString sAlbum,
                     float iSongDuration, QString sMusicUrl, QString sMusicPic, bool loved):
    bLoved(loved)
    //:songDuration(3.24),album("本地下载音乐")
{
   this->iListIndex = iIndex;
   this->I_MusicID = iMusicID;
   this->StrMusicName = sMusicName;
   this->StrSingerName= sSingerName;
   this->album= sAlbum.isEmpty()? "本地下载音乐":sAlbum;
   this->songDuration = !(iSongDuration)? 3.24:iSongDuration;
   this->MusicUrl = sMusicUrl;
   this->MusicPic = sMusicPic;
   this->bLoved = loved;

}

int MusicInfo::getI_MusicID() const
{
    return I_MusicID;
}

const QString &MusicInfo::getStrMusicName() const
{
    return StrMusicName;
}


const QString &MusicInfo::getAlbum() const
{
    return album;
}

float MusicInfo::getSongDuration() const
{
    return songDuration;
}

const QString &MusicInfo::getMusicUrl() const
{
    return MusicUrl;
}

const QString &MusicInfo::getMusicPic() const
{
    return MusicPic;
}

//const QString &MusicInfo::getHash() const
//{
//    return hash;
//}

const QString &MusicInfo::getStrSingerName() const
{
    return StrSingerName;
}

int MusicInfo::getIListIndex() const
{
    return iListIndex;
}

void MusicInfo::setiListIndex(int newListIndex)
{
    iListIndex = newListIndex;
}

bool MusicInfo::getBLoved() const
{
    return bLoved;
}

void MusicInfo::setBLoved(bool newBLoved)
{
    bLoved = newBLoved;
    qDebug()<<"bLoved="<<bLoved;
}



